<style>
.dropdown-menu li a{
	line-height: 1.42857143;
	padding: 0px;
	width: 100%;
}
</style>
<#assign currentUser=Session['LOGIN_PLUGIN_SESSION_NAME']!''/>
<!--<div class="commnav">
    <div class="main">
        <div class="wrap cf">
            <div class="left">  
            </div>
            <div class="right">
                <div class="h-r-login">
                    搜索
                    <div class="input-group2">
                        <a>
                        <input type="text" name="search" class="form-control mate-rial" placeholder="请搜索课程..." tabindex="3">
                        <i class="glyphicon glyphicon-search"></i>
                        </a>
                    </div>

                    个人中心
                    <div class="text-right">
                        <ul class="list-inline top-dark-right">
                            <li><i class="glyphicon glyphicon-user"></i><a href="登录注册/login.htm">登录</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>-->
		<div class="home1header-warpper">
			<div class="home1header">
				<img src="${contextPath}/hivelearnweb/skin/img/222.png" />
			</div>
		</div>
		<div class="nav-topline">
			<div class="pull-left" style="background-color: #5ed1d8;width: 30%;height: 100%;"></div>
			<div class="pull-left" style="background-color: #c1e400;width: 20%;height: 100%;"></div>
			<div class="pull-left" style="background-color: #ff5501;width: 20%;height: 100%;"></div>
			<div class="pull-left" style="background-color: #f9a123;width: 20%;height: 100%;"></div>
			<div class="pull-left" style="background-color: #5ed1d8;width: 10%;height: 100%;"></div>
		</div>
		<div class="home1nav-warpper">
			<div class="home1nav-container">
				<ul class="nav-list">
					<li>
						<a class="nav-listitem nav-active" href="${contextPath}/hivelearnweb/portal/homePage/homePage.html">首页</a>
					</li>
					<li>
						<a class="nav-listitem" href="${contextPath}/portal/courselibrary/toCourseLibrary.do">在线课程</a>
					</li>
					<li>
						<a class="nav-listitem" href="${contextPath}/portal/resource/findList">在线课件</a>
					</li>
					<li>
						<a class="nav-listitem" href="${contextPath}/portal/column/toKnowledge">奥运会知识管理(OGKM)</a>
					</li>
					<li>
						<a class="nav-listitem" href="${contextPath}/portal/column/toParalympicsplan">卓越计划</a>
					</li>
					<li style="display:none;">
						<a class="nav-listitem" href="${contextPath}/portal/teacher/findTeacher">培训师</a>
					</li>
					<li>
						<a class="nav-listitem" href="${contextPath}/portal/information/findList">资讯</a>
					</li>
					<li style="display:none;">
						<a class="nav-listitem" href="${contextPath}/portal/column/toPavilion">培训基地</a>
					</li>
					<li>
						<a class="nav-listitem" href="${contextPath}/opwguser/usercenter/toCenter">个人空间</a>
					</li>
				</ul>
				<div style="position: absolute;right: 90px;top: 0;color: #d1d1d1;">
					<span class="searchicon glyphicon glyphicon-search" style="margin-right: 10px;padding-top:19px;"></span><span class="sanjiao glyphicon glyphicon-triangle-top"></span>
				</div>
				<div class="user-search">
					<div class="input-group">
						<span class="glyphicon glyphicon-search" style="position: absolute;left: 8px;top: 11px;z-index: 10;color: #C0C0C0;width:20px;"></span>
     					<input type="text" class="form-control sousuo" id="search" placeholder="请搜索课程...">
						<span class="input-group-btn" style="line-height:12px;">
       						<button class="btn btn-default sousuo-btn" id="courseSearch" type="button">搜索</button>
     					</span>
					</div>
				</div>
			</div>
		</div>
		<div class="nav-bottomline">
			<div class="pull-left" style="background-color: #df901f;width: 20%;height: 100%;"></div>
			<div class="pull-left" style="background-color: #d64701;width: 20%;height: 100%;"></div>
			<div class="pull-left" style="background-color: #b4d500;width: 20%;height: 100%;"></div>
			<div class="pull-left" style="background-color: #4fafb5;width: 20%;height: 100%;"></div>
			<div class="pull-left" style="background-color: #e89621;width: 20%;height: 100%;"></div>
		</div>
<script type="text/javascript">
 
$(function(){
	//点击搜索事件
	$("#courseSearch").click(function(){
	   var val = $(this).closest(".input-group").find("input").val();
	   if(/^\s*$/.test(val)){
	   $(this).closest(".input-group").find("input");
	   return;
	   }
	   window.location.href="${contextPath}/portal/frontend/dgo?ftlpath=course1.ftl#"+val;  
	    
	});
	//监听搜索的键盘事件
		$(function(){
			$("#search").bind('focus',function(){
				 var self = $(this);
				 var event = event||window.event;
				$("#search").keydown(function (event) {
					var val = self.val();
					 if(event.keyCode == 13){
					  if(/^\s*$/.test(val)){
						  self.attr('placeholder','内容不能为空');
						  return;
					  }
						window.location.href = '${contextPath}/portal/frontend/dgo?ftlpath=course1.ftl#'+val; 
					 }
				})
				
			})
		})
		//失去焦点让默认文本恢复
	   $(function(){
		   $('.navbar-nav .input-group2 input').bind('blur',function(){
			   var val = $(this).val();
			   if(/^\s*$/.test(val)){
			   $(this).val('').attr('placeholder','请搜索课程');
			   }
			   
		   })
	   })
})
  //导航滑过效果
$(document).ready(function() {
  $('.navbar-collapse li').hover(function(){ 
      $(this).addClass("active").siblings().removeClass("active"); 
  });
}); 
$(document).ready(function(){
  (function(e) {
    function l() {
        return f == true ? false : window.DeviceOrientationEvent != undefined
    }

    function c(e) {
        x = e.gamma;
        y = e.beta;
        if (Math.abs(window.orientation) === 90) {
            var t = x;
            x = y;
            y = t
        }
        if (window.orientation < 0) {
            x = -x;
            y = -y
        }
        u = u == null ? x : u;
        a = a == null ? y : a;
        return {
            x: x - u,
            y: y - a
        }
    }

    function h(e) {
        if ((new Date).getTime() < r + n) return;
        r = (new Date).getTime();
        var t = s.offset() != null ? s.offset().left : 0,
            u = s.offset() != null ? s.offset().top : 0,
            a = e.pageX - t,
            h = e.pageY - u;
        if (a < 0 || a > s.width() || h < 0 || h > s.height()) return;
        if (l()) {
            if (e.gamma == undefined) {
                f = true;
                return
            }
            values = c(e);
            a = values.x / 30;
            h = values.y / 30
        }
        var p = a / (l() == true ? o : s.width()),
            d = h / (l() == true ? o : s.height()),
            v, m;
        for (m = i.length; m--;) {
            v = i[m];
            newX = v.startX + v.inversionFactor * v.xRange * p;
            newY = v.startY + v.inversionFactor * v.yRange * d;
            if (v.background) {
                v.obj.css("background-position", newX + "px " + newY + "px")
            } else {
                v.obj.css("left", newX).css("top", newY)
            }
        }
    }
    var t = 25,
        n = 1 / t * 1e3,
        r = (new Date).getTime(),
        i = [],
        s = e(window),
        o = 1,
        u = null,
        a = null,
        f = false;
    e.fn.plaxify = function(t) {
        return this.each(function() {
            var n = -1;
            var r = {
                xRange: e(this).data("xrange") || 0,
                yRange: e(this).data("yrange") || 0,
                invert: e(this).data("invert") || false,
                background: e(this).data("background") || false
            };
            for (var s = 0; s < i.length; s++) {
                if (this === i[s].obj.get(0)) {
                    n = s
                }
            }
            for (var o in t) {
                if (r[o] == 0) {
                    r[o] = t[o]
                }
            }
            r.inversionFactor = r.invert ? -1 : 1;
            r.obj = e(this);
            if (r.background) {
                pos = (r.obj.css("background-position") || "0px 0px").split(/ /);
                if (pos.length != 2) {
                    return
                }
                x = pos[0].match(/^((-?\d+)\s*px|0+\s*%|left)$/);
                y = pos[1].match(/^((-?\d+)\s*px|0+\s*%|top)$/);
                if (!x || !y) {
                    return
                }
                r.startX = x[2] || 0;
                r.startY = y[2] || 0
            } else {
                var u = r.obj.position();
                r.obj.css({
                    top: u.top,
                    left: u.left,
                    right: "",
                    bottom: ""
                });
                r.startX = this.offsetLeft;
                r.startY = this.offsetTop
            }
            r.startX -= r.inversionFactor * Math.floor(r.xRange / 2);
            r.startY -= r.inversionFactor * Math.floor(r.yRange / 2);
            if (n >= 0) {
                i.splice(n, 1, r)
            } else {
                i.push(r)
            }
        })
    };
    e.plax = {
        enable: function(t) {
            e(document).bind("mousemove.plax", function(n) {
                if (t) {
                    s = t.activityTarget || e(window)
                }
                h(n)
            });
            if (l()) {
                window.ondeviceorientation = function(e) {
                    h(e)
                }
            }
        },
        disable: function(t) {
            e(document).unbind("mousemove.plax");
            window.ondeviceorientation = undefined;
            if (t && typeof t.clearLayers === "boolean" && t.clearLayers) i = []
        }
    };
    if (typeof ender !== "undefined") {
        e.ender(e.fn, true)
    }
})(function() {
      return typeof jQuery !== "undefined" ? jQuery : ender
  }())

  var layers = $('.js-plaxify');

  $.each(layers, function(index, layer) {
      $(layer).plaxify({
          xRange: $(layer).data('xrange') || 0,
          yRange: $(layer).data('yrange') || 0,
          invert: $(layer).data('invert') || false
      })
  });

  $.plax.enable()
});
</script>